
<form method="post" id="editForm" name="editForm">
<input type="hidden" name="id" value="${(po.id)!}" id="poid">
<table class="tableForm tableCss">
    <tr>
        <th style="width: 150px;">单位：</th>
        <td>
            <input class="easyui-combotree" style="width:100%" name="dep_id" id="dep_id" value="${(po.dep_id!)!}" data-options="url:'admin/department/combotree',method:'get',required:true">
        </td>
        <th style="width: 150px;">项目名称：</th>
        <td>
            <input type="hidden" name="project_name" id="project_name_bb" value="${(po.project_name!)!}"/>

            <input class="easyui-combotree" name="project_name_1" id="project_name_1" value="${(po.project_name!)!}" data-options="url:'admin/project_base/combotree',method:'get',required:true,
                    onSelect: function(rec){
                        if(rec.pid==0){
                            $.messager.alert('提示','请选择项目名称');
                            $('#project_name_1').setValue('');
                        }else{
                           $('#project_name_bb').val(rec.text);
                        }
                    }" style="width:200px;">
            <!--<input class="easyui-textbox"  style="width:100%" name="project_name" id="project_name" value="${(po.project_name!)!}" data-options="required:true">-->
        </td>
    </tr>
    <tr>
        <th>项目级别：</th>
        <td>
            <input class="easyui-combobox" style="width:100%" name="project_rank" id="project_rank" value="${(po.project_rank!)!}" data-options="url:'admin/student/sys_pa_code?table=bk_project&field=project_rank',method:'get',valueField:'id',textField:'name'" >
        </td>
        <th>项目类别：</th>
        <td>
            <input class="easyui-combobox" style="width:100%" name="project_type" id="project_type" value="${(po.project_type!)!}" data-options="url:'admin/student/sys_pa_code?table=bk_project&field=project_type',method:'get',valueField:'id',textField:'name'">
        </td>
    </tr>
    <tr>
        <th>开始时间：</th>
        <td>
            <input class="easyui-datebox" style="width:100%" type="text" name="project_plan_begin_time" value="${(po.project_plan_begin_time!)!}" data-options="formatter:myformatter,parser:myparser" >
        </td>
        <th>结束时间：</th>
        <td>
            <input class="easyui-datebox" style="width:100%" type="text" name="project_plan_end_time" value="${(po.project_plan_end_time!)!}" data-options="formatter:myformatter,parser:myparser" >
        </td>
    </tr>
    <tr>
        <th>参与人数：</th>
        <td>
            <input class="easyui-textbox" style="width:100%" type="text" id="project_plan_user_num" name="project_plan_user_num" value="${(po.project_plan_user_num!)!}">
        </td>
        <th>培训：</th>
        <td>
            <input class="easyui-combobox" style="width:100%" name="project_is_training" id="project_is_training" value="${(po.project_is_training!)!}" data-options="url:'admin/student/sys_pa_code?table=common&field=boolean',method:'get',valueField:'id',textField:'name'">
        </td>
    </tr>
    <tr>
        <th>设置临时考场：</th>
        <td>
            <input class="easyui-combobox" style="width:100%" name="project_is_temporary_place" id="project_is_temporary_place" value="${(po.project_is_temporary_place!)!}" data-options="url:'admin/student/sys_pa_code?table=common&field=boolean',method:'get',valueField:'id',textField:'name'">
        </td>
        <th>备注：</th>
        <td>
            <input class="easyui-textbox" style="width:100%" name="memo" id="memo" value="${(po.memo!)!}">
        </td>
    </tr>
</table>
</form>
<script>

    function myformatter(date){
        var y = date.getFullYear();
        var m = date.getMonth()+1;
        var d = date.getDate();
        return y+'-'+(m<10?('0'+m):m)+'-'+(d<10?('0'+d):d);
    }
    function myparser(s){
        if (!s) return new Date();
        var ss = (s.split('-'));
        var y = parseInt(ss[0],10);
        var m = parseInt(ss[1],10);
        var d = parseInt(ss[2],10);
        if (!isNaN(y) && !isNaN(m) && !isNaN(d)){
            return new Date(y,m-1,d);
        } else {
            return new Date();
        }
    }
</script>
